package cn.schoolwow.util.test.module.compare.instanceList.domain;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.time.LocalDate;

public class AddProjectTimeNode implements Serializable {
    /**时间节点名称*/
    public String name;

    /**截止日期,格式yyyy-MM-dd*/
    @JSONField(format = "yyyy-MM-dd")
    public LocalDate deadline;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        AddProjectTimeNode that = (AddProjectTimeNode) o;

        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        return deadline != null ? deadline.equals(that.deadline) : that.deadline == null;
    }

    @Override
    public int hashCode() {
        int result = name != null ? name.hashCode() : 0;
        result = 31 * result + (deadline != null ? deadline.hashCode() : 0);
        return result;
    }
}
